package chapter2;
import java.util.ArrayList;
import java.util.Scanner;
import java.math.BigInteger;
public class Test7 {

	public static void main(String[] args) {
		ArrayList<String> List = new ArrayList<String>(); 
		Scanner in=new Scanner(System.in);
		BigInteger re=new BigInteger("0");
		while(in.hasNextLine()){
			String s=in.nextLine();
			if(s.equals("e")||s.equals("E")){
				break;
			}
			else{
			List.add(s);
			}
		}
		//System.out.println(List);
		Object []arr=List.toArray();
		for (int i = 0; i < arr.length; i++) {
			String str=(String)arr[i] ;
			BigInteger b=new BigInteger(str);
			re=re.add(b);
			//System.out.println(re);97967883730498271109594004638709798272918548148116
		}
		System.out.println(re);
	}
}
